/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sv.com.compassion.entidades;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;

/** Clase entidad para el mapeo de tabla de base de datos Salidaxbeneficiario
* @author grupo de Tesis
*/
@Entity
@Table(name = "salidaxbeneficiario")
@NamedQueries({
    @NamedQuery(name = "Salidaxbeneficiario.findAll", query = "SELECT s FROM Salidaxbeneficiario s")})
public class Salidaxbeneficiario implements Serializable {
    private static final long serialVersionUID = 1L;
    @Basic(optional = false)
    @NotNull
    @Column(name = "fecSalida")
    @Temporal(TemporalType.DATE)
    private Date fecSalida;
    @Basic(optional = false)
    @NotNull
    @Column(name = "AuAddUsr")
    private int auAddUsr;
    @Basic(optional = false)
    @NotNull
    @Column(name = "AuAddDat")
    @Temporal(TemporalType.DATE)
    private Date auAddDat;
    @Column(name = "AuModUsr")
    private Integer auModUsr;
    @Column(name = "AuModDat")
    @Temporal(TemporalType.DATE)
    private Date auModDat;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @NotNull
    @Column(name = "idSalidaxBeneficiario")
    private Integer idSalidaxBeneficiario;
    @JoinColumn(name = "idSalida", referencedColumnName = "idSalida")
    @ManyToOne(optional = false)
    private Salida idSalida;
    @JoinColumn(name = "idBeneficiario", referencedColumnName = "idBeneficiario")
    @ManyToOne(optional = false)
    private Beneficiario idBeneficiario;

    public Salidaxbeneficiario() {
    }

    public Salidaxbeneficiario(Integer idSalidaxBeneficiario) {
        this.idSalidaxBeneficiario = idSalidaxBeneficiario;
    }

    public Salidaxbeneficiario(Integer idSalidaxBeneficiario, Date fecSalida, int auAddUsr, Date auAddDat) {
        this.idSalidaxBeneficiario = idSalidaxBeneficiario;
        this.fecSalida = fecSalida;
        this.auAddUsr = auAddUsr;
        this.auAddDat = auAddDat;
    }

    public Date getFecSalida() {
        return fecSalida;
    }

    public void setFecSalida(Date fecSalida) {
        this.fecSalida = fecSalida;
    }

    public int getAuAddUsr() {
        return auAddUsr;
    }

    public void setAuAddUsr(int auAddUsr) {
        this.auAddUsr = auAddUsr;
    }

    public Date getAuAddDat() {
        return auAddDat;
    }

    public void setAuAddDat(Date auAddDat) {
        this.auAddDat = auAddDat;
    }

    public Integer getAuModUsr() {
        return auModUsr;
    }

    public void setAuModUsr(Integer auModUsr) {
        this.auModUsr = auModUsr;
    }

    public Date getAuModDat() {
        return auModDat;
    }

    public void setAuModDat(Date auModDat) {
        this.auModDat = auModDat;
    }

    public Integer getIdSalidaxBeneficiario() {
        return idSalidaxBeneficiario;
    }

    public void setIdSalidaxBeneficiario(Integer idSalidaxBeneficiario) {
        this.idSalidaxBeneficiario = idSalidaxBeneficiario;
    }

    public Salida getIdSalida() {
        return idSalida;
    }

    public void setIdSalida(Salida idSalida) {
        this.idSalida = idSalida;
    }

    public Beneficiario getIdBeneficiario() {
        return idBeneficiario;
    }

    public void setIdBeneficiario(Beneficiario idBeneficiario) {
        this.idBeneficiario = idBeneficiario;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idSalidaxBeneficiario != null ? idSalidaxBeneficiario.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Salidaxbeneficiario)) {
            return false;
        }
        Salidaxbeneficiario other = (Salidaxbeneficiario) object;
        if ((this.idSalidaxBeneficiario == null && other.idSalidaxBeneficiario != null) || (this.idSalidaxBeneficiario != null && !this.idSalidaxBeneficiario.equals(other.idSalidaxBeneficiario))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "sv.com.compassion.entidades.Salidaxbeneficiario[ idSalidaxBeneficiario=" + idSalidaxBeneficiario + " ]";
    }
    
}
